package com.supplychain.scm.core.common.util;

import lombok.experimental.UtilityClass;
import org.dromara.dynamictp.core.DtpRegistry;
import org.dromara.dynamictp.core.executor.DtpExecutor;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName ThreadPoolUtils
 * @createTime 17:53:00 2023/05/17
 */
@UtilityClass
public class ThreadPoolUtils {

    /**
     * 更具线程池名称获取动态线程池
     * @param poolName
     * @return
     */
    public DtpExecutor getDtpExecutor(String poolName) {

        return DtpRegistry.getDtpExecutor(poolName);
    }
}
